perm filename DATE.OLD[POX,WD] blob sn#363250 filedate 1978-06-18 generic text, type T, neo UTF8
\|\\;				Define Brick Character
\;
\⊂'000040;\;	VERREM - REM's syntax for defining macros with args 
\⊂'000400;\;	VERRHT - modified way to pass args with nest chars
\;
\;    Macro to expand month number (decimal string) into month name
\;
\8MONTH(NSTR)[\!MONTH⊗NSTR⊗;]\;
\	;\∞MONTH1[JANUARY]\∞MONTH2[FEBRUARY]\∞MONTH3[MARCH]\∞MONTH4[APRIL]\;
\	;\∞MONTH5[MAY]\∞MONTH6[JUNE]\∞MONTH7[JULY]\∞MONTH8[AUGUST]\;
\	;\∞MONTH9[SEPTEMBER]\∞MONTH10[OCTOBER]\∞MONTH11[NOVEMBER]\;
\	;\∞MONTH12[DECEMBER]\;
\;
\;
\;	     Create Global Overlay for use in EVERYPAGE Macro
\;
\P\;					save ac
\∃∀\;					date and time to ac
\P\;					push ac
\L=-18;\;				peel off date with lsh
\P\;					save it
\%=31;\;				get day of month
\+=1;\;					add 1 to normalize
\!EVAL((\∞)(DA[)\D∀(]));\;		put in day macro
\p\;					pop date into ac
\/=31;\;				convert it to months
\P\;					push it again
\%=12;\;				get month of year
\+=1;\;					add 1 to normalize
\!EVAL((\∞)(MO[)\!MONTH(\D∀);(]));\;	put in month macro
\p\;					pop date in months
\/=12;\;				convert to years
\+=1964;\;				in Gregorian cal
\!EVAL((\∞)(YR[)\D∀(]));\;		save year in macro
\p\;					pop date and time
\∧'777777;\;				pull out time in minutes
\P\;					push it
\%=60;\;				find no of minutes after hour
\!EVAL((\∞)(MIN[)\D∀(]));\;		put it in macro
\p\;					pop time
\/=60;\;				find the hour
\!EVAL((\∞)(HR[)\D∀(]));\;		put it in macro
\p\;					restore ac
\;
\oDATIM{0\!DA; \!MO; \!YR; \!HR;:\!MIN;}\;	define date and time overlay
\;
\;
\∞EVERYPAGE[\N
\	;\P\N				save ac
\	;\!INCR(PAGNUM);\N		increment global page #
\	;\←U\+=1;\→U\N			increment local page #
\	;\!INSECFLAG;\?SECPAGNUM(\DS,\DU);\N
\	;\N				print sec and pag nums ?
\	;\oABSPAG{0 - \!PAGNUM;}\N	global page # overlay
\	;\&DATPAG←DATIM&ABSPAG;\N	join it with date overlay
\	;\WDATPAG,=200;=2150;\N		print date and page overlay
\	;\∂←ABSPAG;\N			expunge abs page overlay
\	;\p]\;				restore ac
\;
\;
\8SECPAGNUM(SEC,PAG)[\N
\	;\oPAGNO{0\!ROMAN(⊗SEC⊗);-⊗PAG⊗}\N
\	;				construct local page overlay
\	;\WPAGNO,=800;=2100;\N		print local page overlay
\	;\!EVAL((\∂←)PAGNO(;));]\;	expunge local page overlay
\;